/**
 * @name test
 * @desc 测试store
 * @author darcrand
 */

import { setState } from "@/utils"

const state = {
    count: 0
}

const mutations = { setState }

const actions = {
    add({ state, commit }) {
        commit("setState", { count: state.count + 1 })
    },

    sub({ state, commit }) {
        commit("setState", { count: state.count - 1 })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}
